package com.demo.highSpeedMap.service;

import com.demo.highSpeedMap.entity.DoorDrivingInfo;
import com.demo.highSpeedMap.mapper.DoorDrivingInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoorDrivingInfoService {

    @Autowired
    DoorDrivingInfoMapper doorDrivingInfoMapper ;
    public List<DoorDrivingInfo> queryDoorDrivingInfo(){
        return doorDrivingInfoMapper.queryDoorDrivingInfo();
    }

    public DoorDrivingInfo queryByDoorId(String doorId){
        List<DoorDrivingInfo>  list = doorDrivingInfoMapper.queryByDoorId(doorId);
        if (list.isEmpty()){
            return null;
        }else {
            return list.get(0);
        }

    }




}
